# -*- coding:utf-8 -*-
# Author:Ami

names = ["adc", "ap", "dps", "H5"]
names2 = ["adc", "ap", "dps", "dps", "H5"]

namess = ["adc", "ap", "dps", "dps", "H5"]

print(names[0])

print(names[1:3])

print(names[-1])

print(names[-2:])

names.append("javascript")

print(names)
names.insert(3, "js")
print(names)

names[2] = "zhanshi"
print(names)

names.remove("adc")
print(names)

del names[1]
print(names)

names.pop()
print(names)
names.pop(1)
print(names)

print(names2.index("H5"))
print(names2.count("dps"))
names2.reverse()
print(names2)
names3 = [1, 2, 3]
names2.extend(names3)
# del names3
print('233', names2, names3)
adc = [1,2,['a','b'],4]
namesx = adc.copy()#浅复制 只复制了第一层
namesx[1] = 233
namesx[2][0] = "adc"
print(adc)
print(namesx)
import copy

name233 = copy.deepcopy(adc)#深度复制
name233[1] = 666
name233[2][0] = "ap"

print(adc)
print(name233)

for i in name233:
    print(i)


